import http from '@/design/libs/request/request'

const BASE_URL = '/market/coupon/card'

export default {
  // 获取列表数据
  list: data => http.post(BASE_URL + '/list', data),
  // 创建数据
  create: data => http.post(BASE_URL + '/create', data),
  // 获取数据
  fetch: (id) => http.post(BASE_URL + '/fetch/' + id),
  // 更新数据
  update: data => http.post(BASE_URL + '/update', data),
  // 删除单个
  delete: (id) => http.post(BASE_URL + '/delete/' + id),
  // 更新状态
  disable: data => http.post(BASE_URL + '/disable', data),
  // 获取数据
  data: data => http.post(BASE_URL + '/data', data),
  // 作废
  cancel: data => http.post(BASE_URL + '/cancel', data),
  // 发劵作废
  sendCancel: data => http.post(BASE_URL + '/sendCancel', data),
  // 核销
  consume: data => http.post(BASE_URL + '/consume', data),
  // 核销明细
  consumerecord: data => http.post(BASE_URL + '/consumerecord', data),
  // 核销撤销
  consumecancel: data => http.post(BASE_URL + '/consumecancel', data),
  // 批量优惠券作废
  batchcancel: data => http.post(BASE_URL + '/batchcancel', data),
  // 批量优惠券核销
  batchconsume: data => http.post(BASE_URL + '/batchconsume', data)
}

